<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@page import="java.util.List"%>
    <%@page import="com.hongye.app.model.EvaluationModel"%>
    <%@page import="com.hongye.app.model.UserAppModel"%>
    <%@page import="com.hongye.app.model.GoodsModel"%>
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="stylesheet" type="text/css" href="css/index.css"/>
	<link rel="stylesheet" href="css/reset.css"/>
	<link rel="stylesheet" href="css/pullToRefresh.css"/>
	<script src="js/jquery.min.js"></script>
	<script src="js/jquery-2.1.4.min.js"></script>
	<script src="js/iscroll.js"></script>
<!--<script src="js/pullToRefresh.js"></script>-->
<script type="text/javascript">
</script>
		
<style type="text/css">
.comment img{ height: 80px;}
.introduce span:nth-child(3) {float: right;}
.prod-title {
    position: relative;
}
.prod-title span{
    font-size: 0.32rem;
	width: 100%;
	overflow: hidden;
	line-height: 0.5rem;
	margin: 0.15rem 0;
}

video::-webkit-media-controls-start-playback-button {
   display: none;
}

.h_b img { 
	height: auto; 
	width: auto\9; 
	width: 100%; 
}

</style>
</head>
<body>

<div id="wrapper">
  <ul>
    <li>
	    <div class="game-info"> 
	    	<video style="display: block;" id="video_id" width="100%" controls autoplay  loop="loop" webkit-playsinline playsinline="true" poster="../upload/${g['thumb']}"><source src="../upload/${g['videoname']}"></video>
	    </div>
    </li>
     <li>	  
   	   <div class="price_bg" style="background: url(img/back.png) no-repeat top center ; height: 1rem; padding:0 0.28rem; display: flex;display: -webkit-flex; justify-content: space-between; align-items: center;" >
    	  <b class="rmb" style="color: white;font-weight: normal; "><span style="margin-right:0.08rem; font-size:0.32rem;">￥</span>${g['real_price']}</b>
          <div class="img_bg" style="width: 0.6rem; height: 0.6rem; ">
          	 <a href="#" onclick="share();"><img style="width: 100%; display: block;"  src="img/fenx.png" /></a>
          </div>
        
   	   </div>
    </li>
    <li><div class="game-info">
    	<div class="price">
						<div class="prod-title">
							<span class="title-text-wrap"  style="float: left;">
							<%GoodsModel gm = (GoodsModel)request.getAttribute("g");%>
							<%int sellerid =  Integer.valueOf(gm.getStr("seller_id")); 
							if(sellerid == 61){%>
								<i class="label-icon-div have-not-icon-div icon-pos red-div" style="background-color: #f23030; margin-right: 0.15rem;border-radius: 5px;" >
									<span class="label-text white-text" style="margin-left: 0.1rem; text-align:center; color: #fff;">自营</span>
								</i>
							<%}%>
								<span class="title-text" >${g['g_name']}</span>
							</span>											
						</div>								
						<div class="introduce" style="display: flex;display: -webkit-flex; justify-content: space-between;">
							<span style="color: #333333;">快递：${postage}</span>
							<span style="margin: 0; color: #888;">库存：${g['stock']}</span>
							<span style="color: #888;">${g['sales']}人购买</span>
						</div>
					</div>
					<div class="sp_xq">商品详情</div>
			    	<div class="sp_xq h_b">${g['content'] }</div>
			    	<div class="sp_xq">宝贝评价</div>
    </div></li>
    <li>
    	<div class="game-info">
    	
	    	<div class="comment">
			    	<%List<EvaluationModel> evaluation=(List)request.getAttribute("evaluation");%>
			    	<%
						for(int i=1;i<=evaluation.size();i++){
							EvaluationModel em=evaluation.get(i-1);
						%>
							<div class="by_comment">
								<div class="com">
									<em class="com_em">
					    				<b><img src='<%=em.get("avatar") %>'/></b>
					    				<span><%=em.get("nick") %></span>
					    				<i><%=em.get("c_time") %></i>
					    			</em>
					    			<div class="imgs">
						    			<p>
						    				<span><%=em.get("evaluation") %></span>
						    				<%String thumb1 = em.get("thumb1"); 
											if(thumb1 != "true"){%>
												<i><img src='<%=em.get("thumb1") %>'/></i>
											<%}%>
											<%String thumb2 = em.get("thumb2"); 
											if(thumb2 != "true"){%>
												<i><img src='<%=em.get("thumb2") %>'/></i>
											<%}%>
											<%String thumb3 = em.get("thumb3"); 
											if(thumb3 != "true"){%>
												<i><img src='<%=em.get("thumb3") %>'/></i>
											<%}%>
											<%String thumb4 = em.get("thumb4");
											if(thumb4 != "true"){%>
												<i><img src='<%=em.get("thumb4") %>'/></i>
											<%}%>
						    			</p>
					    			</div>
								</div>
					    	</div>
					<%} %>
		    	</div>
		</div>
    </li>  
  </ul>
</div>
<script type="text/javascript">
	$(function(){
	   $(".h_b").find("img").attr("style","");
	})
		
	function Rem() {
		var docEl = document.documentElement,
			oSize = docEl.clientWidth / 7.5;
		if(oSize > 85) {
			oSize = 85;
		}
		docEl.style.fontSize = oSize + 'px';
	}
	window.addEventListener('resize', Rem, false);
	Rem();
</script>
<script type="text/javascript">
<!--

var vidoe = document.getElementById("video_id");
vidoe.play();

var PAGENUMBER = 1;
//refresher.init({
	//id:"wrapper",                                    
	//pullUpAction:Load																
//});																																							

function Load() {
	setTimeout(function () {
		var pageNumber = PAGENUMBER + 1;
		$.get("../app/goodsDetail_Comment?gid=" + ${g.id}, {pageNumber:pageNumber}, function(data){
			if(data.trim() != ""){// 没有更多内容.
				$(".comment").append(data);
				PAGENUMBER += 1;
				return;
			}
			$(".pullUpLabel").html('无更多评论');
		});
		wrapper.refresh();
	},1000);	
}

function share(){
	this.location.href = '../goodsdetail/share';
}
-->
</script>

</body>
</html>
